<?php $suattr = $sf_user->getAttribute('suattr') ?>
<?php include_component('includes','submenu') ?>
<fieldset style="background-color: white;">
  <div style="float: left;width: 670px;min-height: 200px;">
    <div style="padding: 10px;">
      <div style="font-size: 17px;padding: 5px 15px 10px 15px;">
        AUTORES
      </div>
      <div style="background-color: #F6F6EA;padding-bottom: 50px;">
        <table width="100%">
          <tr>
              <td valign="top">
                <div style="padding: 15px;">
                  <?php echo image_tag('/uploads/author/'.$author->getId().'.jpg','size=100x100') ?>
                </div>
              </td>
              <td>
                <table>
                  <tr>
                    <td>
                        <table width="100%">
                            <tr>
                                <td height="60">
                                    <div style="font-size: 17px;">
                                        <?php if(isset($array_users[0])){ ?>
                                        <?php echo $array_users[0]->{'name'}.' '.$array_users[0]->{'lastName'} ?>
                                        <?php }else{ ?>
                                        <?php echo 'Autor Nombre Completo'; ?>
                                        <?php } ?>
                                    </div>
                                </td>
                                <td align="right">
                                    <div style="padding: 10px 15px 10px 5px;">
                                        <?php echo include_component('includes','subscriptions', array('id' => $author->getId())) ?>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                  </tr>
                  <tr>
                    <td>
                      <p style="text-align: justify;">
                          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam quis elit nunc, auctor mollis nisi. Curabitur vitae nulla sed risus vestibulum scelerisque ut quis velit. Phasellus in sem ut est ultricies convallis eget a sem. Nulla at neque urna, sit amet venenatis sapien. Suspendisse eros ligula, cursus nec fringilla at, feugiat et mauris. Nulla facilisi. Maecenas at lacinia odio. Proin euismod, nisl eu euismod laoreet, tellus nisi malesuada risus, quis ornare erat odio quis ligula. Pellentesque rutrum dolor quis erat consequat ultrices. Curabitur eget nibh vitae leo euismod porttitor. Mauris quis feugiat dui. Mauris viverra, odio eleifend volutpat consequat, mi diam porttitor dui, eget placerat diam magna ac sapien. Sed nisi libero, adipiscing eu lacinia non, dapibus ut dui. Aliquam bibendum diam sed mauris lacinia sagittis. Nunc suscipit, mauris sit amet dictum dignissim, enim tellus tincidunt augue, ac malesuada metus tortor fringilla quam. Sed quis nisl eu lorem sodales semper a a orci. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
                      </p>
                    </td>
                  </tr>
                </table>
              </td>
          </tr>
        </table>
      </div>
      <?php if(count($articles)>0){ ?>
      <div style="width: 100%;background-color: white;">
        <div style="margin: 10px 20px;text-align: justify;">
          <div class="section">
            <div class="title2">
                <div>Art&iacute;culos de autor</div>
            </div>
            <div style="width: 590px;height: 1px;background-color: #cdd2d6;margin-left: 10px;"></div>
            <div class="body related_list">
              <ul>
                  <?php foreach($articles as $article){ ?>
                    <li>
                        <a href="<?php echo url_for('@article?id='.$article->getId().'&slug='.$article->getSlug()) ?>">
                            <?php echo $article->getTitle() ?></a>
                    </li>
                  <?php } ?>
              </ul>
            </div>
          </div>
        </div>
      </div>
      <?php } ?>
      <div style="width: 100%;margin-top: 5px;" class="borde_redondeado barra_articulo">
        <ul>
            <?php if($sf_user->isAuthenticated()){ ?>
            <li class="options">
                <a class="fancyBox" href="#fancyReportar" style="display: block;">
                    <div style="display: inline-block;vertical-align: middle;width: 50px;">
                        Reportar
                    </div>
                    <div style="display: inline-block;vertical-align: middle;">
                        <?php echo image_tag('warning.png','size=16x16') ?>
                    </div>
                </a>
            </li>
            <?php if($suattr[1]=='1'){/* si es autor, puede recomendar */ ?>
            <li class="options">
                <a href="">Recomendar</a>
            </li>
            <?php } ?>
            <?php } ?>
            <li style="float: right;">
              <div style="float: left;padding: 10px;">
                <a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
              </div>
              <div style="float: left;padding: 10px;">
                <a name="fb_share" type="button" share_url="<?php echo $sf_request->getUri() ?>">Compartir en Facebook</a><?php slot('meta_url',$sf_request->getUri()) ?>
              </div>
            </li>
        </ul>
      </div>
    </div>
  </div>
  <div style="float: left;width: 320px;">
    <?php include_component('includes','autores') ?>
    <?php include_component('includes','destacados') ?>
  </div>
</fieldset>